package com.ly.base.annotation;
import org.springframework.lang.Nullable;

import java.lang.annotation.Documented;
import	java.lang.annotation.RetentionPolicy;
import	java.lang.annotation.Retention;
import java.lang.annotation.Target;



import static java.lang.annotation.ElementType.*;


/**
 * @Classname Sex
 * @Description
 * 元注解
 * Retention   注解的生命周期 RUNTIME 运行时  CLASS（默认） 编译保留，运行去除  SOURCE 编译去除
 * @Retention(RetentionPolicy.RUNTIME)
 * target    注解的修饰位置
 * @Target({TYPE,FIELD,METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE, PACKAGE, TYPE_PARAMETER, TYPE_USE})
 * Document  可以被javadoc提前为文档
 * Inherited   使注解可以被继承
 *
 * @Date 2020/4/11 16:06
 * @Author 冷心影翼
 */

@Retention(RetentionPolicy.RUNTIME)
@Target({TYPE,FIELD,METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE, PACKAGE, TYPE_PARAMETER, TYPE_USE})
@Documented
public @interface MyAnnotation  {

    int age()  default 0;

    @Nullable
    String value() ;

    @Nullable
    SonAnnocation son();


    Sex sex() default Sex.MAN;
}
